home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 27.zip
/
BS1 part 27
/
Superbase4_d2.adf
/
Ideas
/
SB_TO_SP.sbp
< prev
next >
Wrap
Text File
|
1992-08-05
|
2KB
|
74 lines
SBP
ÿ½
ÿ½ Demonstration of data transfer between Superbase Pro and Superplan.
ÿ½ Also illustrates use of ARexx for data transfer going out of SBPro.
ÿ½ Author : Darin Arrick, Precision Technical Support, 02/06/91
ÿ½ Superplan should be run first, then SBPro.
ÿ½
ÿ½ This program will take values from fields in a database and plot a
ÿ½ pie graph of them.
ÿ½
ÿ½ These commands set up the graph title and first command.
ÿ"/zy",",pia>ENT","=b1>ENT","Data from Superbase via Arexx>ENT"
ÿ"=a2>ENT",",pie>ENT"
filename$ÿ"graphthis1"
ÿ´ÿfilename$
fieldname$ÿ"Price"
recnum%ÿÿA(filename$)
ÿ½ Clear the sheet, set up the graph title
ÿI%ÿ1ÿq6
ÿ¼cmd$
ÿ"SpRexx"ÿcmd$
ÿ¡ÿ&ÿ0ÿÿ&ÿÿ1ÿpÿwehandle
ÿ±i%
ÿ½ Move the values from the fields into an array for easier processing
ÿ×a%(recnum%)
ÿÉÿ`
ÿx%ÿ1ÿqrecnum%
a%(x%)ÿPrice
ÿÉÿ±
ÿ±x%
ÿ½ Replicate the ",pie" command based on the number of records
cmd$ÿ"/rra2,a3:a"ÿÿH(ÿF(ÿ(recnum%ÿ1)))ÿ">ENT"
ÿ"SpRexx"ÿcmd$
ÿ½ Go to cell c2 and get ready to insert data
ÿ"SpRexx"ÿ"=c2>ENT"
r%ÿrecnum%
ÿ½ Send the data from the array to SuperPlan
ÿq%ÿ1ÿqrecnum%
r%ÿr%ÿ1
cmd$ÿ"=c"ÿÿH(ÿF(ÿ(q%ÿ1)))ÿ">ENT"
ÿ"SpRexx"ÿcmd$
ÿ"SpRexx"ÿÿH(ÿF(ÿ(a%(q%))))ÿ">ENT"
ÿ±q%
ÿ½ Plot the pie graph
ÿ"SpRexx"ÿ"/vs>ENT"
ÿ½ Reset SuperPlan menu to top level
ÿ"SpRexx"ÿ">ESC"
ÿ½ Shut everything down
ÿ""ÿ
ÿÿ"graphthis1"
ÿ
ÿ½ Error handler
ehandle:
ÿ¡ÿ&ÿÿ1ÿp
ÿÂ"Superplan not responding","Please run it first",0,a%
ÿ
ÿÿ¡
e$ÿ"Number"ÿÿ(ÿ&)
ÿÂ"Superplan returned an error : ",e$,0,a%
ÿ